package com.allin.mall.common.es.configuration;

import com.allin.mall.common.es.annotation.EnableElasticsearch;
import com.allin.mall.common.es.properties.ElasticsearchProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.core.env.Environment;

@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(ElasticsearchProperties.class)
public class AutoServiceRegistrationConfiguration implements EnvironmentAware {

    private Environment environment;

    private static final String[] EMPTY_ENTRY = new String[0];

    /**
     * Return the source annotation class used by the selector.
     * @return the annotation class
     */
    protected Class<?> getAnnotationClass() {
        return EnableElasticsearch.class;
    }



    @Override
    public void setEnvironment(Environment environment) {
        this.environment = environment;
    }

    public Environment getEnvironment() {
        return environment;
    }
}
